


print('#'*50)
for i in 'abcdefg':
    print(i)
    break  # 退出整个循环
    print('hello')
print('finish')

# if 'a' in 'abcdefg':
#     print('ok')
#     break
#     # # SyntaxError: 'break' outside loop


for i in 'abcdefg':
    print(i)
    if i == 'f':
        break  # 退出整个循环
    print('hello')
print('finish')


